<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  
</body>
</html>

<script>
// 英文：
  // result - 结果

/* for 循环，打印出 100 以内偶数的和
  var result = 0;
  for (var i = 2; i <= 100; i += 2) {
    result += i;
  }
  console.log('result', result);
*/


/* while 循环，打印出 100 以内偶数的和
  var i = 2,
    sum = 0;
  
  while (i <= 10) {
    // console.log(i);
    if (i % 2 === 0) {
      sum += i;
    }
    i++;
  }
*/
// console.log(sum);
</script>